package com.cv.infra.controller.system.server;

import com.cv.framework.common.pojo.Result;
import com.cv.infra.controller.system.server.vo.ServerRespVO;
import com.cv.infra.service.server.ServerService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static com.cv.framework.common.pojo.Result.success;

/**
 * 基础设施 - 系统/服务器控制层
 *
 * @author Charles_XDXD
 */
@Tag(name = "基础设施 - 系统/服务器控制层")
@RestController
@RequestMapping("/infra/server")
public class ServerController {

    @Resource
    private ServerService serverService;

    @GetMapping("info")
    @Operation(summary = "获取系统/服务器信息")
    public Result<ServerRespVO> getServerInfo() {
        return success(serverService.getServerInfo());
    }

}
